package homework8;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Test1 {
    public static void main(String[] args) {
		List<Integer> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add(i+1);
        }
		Iterator it = list.iterator();
		while(it.hasNext()) {
			Integer i = (Integer) it.next();
			System.out.println(i);
		}
    }
}
